using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_OpenDialogDir_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.OpenDialogDir);

            field = type.GetField("hwndOwner", flag);
            app.RegisterCLRFieldGetter(field, get_hwndOwner_0);
            app.RegisterCLRFieldSetter(field, set_hwndOwner_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_hwndOwner_0, AssignFromStack_hwndOwner_0);
            field = type.GetField("pidlRoot", flag);
            app.RegisterCLRFieldGetter(field, get_pidlRoot_1);
            app.RegisterCLRFieldSetter(field, set_pidlRoot_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_pidlRoot_1, AssignFromStack_pidlRoot_1);
            field = type.GetField("pszDisplayName", flag);
            app.RegisterCLRFieldGetter(field, get_pszDisplayName_2);
            app.RegisterCLRFieldSetter(field, set_pszDisplayName_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_pszDisplayName_2, AssignFromStack_pszDisplayName_2);
            field = type.GetField("lpszTitle", flag);
            app.RegisterCLRFieldGetter(field, get_lpszTitle_3);
            app.RegisterCLRFieldSetter(field, set_lpszTitle_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_lpszTitle_3, AssignFromStack_lpszTitle_3);
            field = type.GetField("ulFlags", flag);
            app.RegisterCLRFieldGetter(field, get_ulFlags_4);
            app.RegisterCLRFieldSetter(field, set_ulFlags_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_ulFlags_4, AssignFromStack_ulFlags_4);
            field = type.GetField("lpfn", flag);
            app.RegisterCLRFieldGetter(field, get_lpfn_5);
            app.RegisterCLRFieldSetter(field, set_lpfn_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_lpfn_5, AssignFromStack_lpfn_5);
            field = type.GetField("lParam", flag);
            app.RegisterCLRFieldGetter(field, get_lParam_6);
            app.RegisterCLRFieldSetter(field, set_lParam_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_lParam_6, AssignFromStack_lParam_6);
            field = type.GetField("iImage", flag);
            app.RegisterCLRFieldGetter(field, get_iImage_7);
            app.RegisterCLRFieldSetter(field, set_iImage_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_iImage_7, AssignFromStack_iImage_7);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.OpenDialogDir());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.OpenDialogDir[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_hwndOwner_0(ref object o)
        {
            return ((huqiang.OpenDialogDir)o).hwndOwner;
        }

        static StackObject* CopyToStack_hwndOwner_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.OpenDialogDir)o).hwndOwner;
            __ret->ObjectType = ObjectTypes.Integer;
            *(IntPtr*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_hwndOwner_0(ref object o, object v)
        {
            ((huqiang.OpenDialogDir)o).hwndOwner = (System.IntPtr)v;
        }

        static StackObject* AssignFromStack_hwndOwner_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.IntPtr @hwndOwner = *(IntPtr*)&ptr_of_this_method->Value;
            ((huqiang.OpenDialogDir)o).hwndOwner = @hwndOwner;
            return ptr_of_this_method;
        }

        static object get_pidlRoot_1(ref object o)
        {
            return ((huqiang.OpenDialogDir)o).pidlRoot;
        }

        static StackObject* CopyToStack_pidlRoot_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.OpenDialogDir)o).pidlRoot;
            __ret->ObjectType = ObjectTypes.Integer;
            *(IntPtr*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_pidlRoot_1(ref object o, object v)
        {
            ((huqiang.OpenDialogDir)o).pidlRoot = (System.IntPtr)v;
        }

        static StackObject* AssignFromStack_pidlRoot_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.IntPtr @pidlRoot = *(IntPtr*)&ptr_of_this_method->Value;
            ((huqiang.OpenDialogDir)o).pidlRoot = @pidlRoot;
            return ptr_of_this_method;
        }

        static object get_pszDisplayName_2(ref object o)
        {
            return ((huqiang.OpenDialogDir)o).pszDisplayName;
        }

        static StackObject* CopyToStack_pszDisplayName_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.OpenDialogDir)o).pszDisplayName;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_pszDisplayName_2(ref object o, object v)
        {
            ((huqiang.OpenDialogDir)o).pszDisplayName = (System.String)v;
        }

        static StackObject* AssignFromStack_pszDisplayName_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @pszDisplayName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.OpenDialogDir)o).pszDisplayName = @pszDisplayName;
            return ptr_of_this_method;
        }

        static object get_lpszTitle_3(ref object o)
        {
            return ((huqiang.OpenDialogDir)o).lpszTitle;
        }

        static StackObject* CopyToStack_lpszTitle_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.OpenDialogDir)o).lpszTitle;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_lpszTitle_3(ref object o, object v)
        {
            ((huqiang.OpenDialogDir)o).lpszTitle = (System.String)v;
        }

        static StackObject* AssignFromStack_lpszTitle_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @lpszTitle = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.OpenDialogDir)o).lpszTitle = @lpszTitle;
            return ptr_of_this_method;
        }

        static object get_ulFlags_4(ref object o)
        {
            return ((huqiang.OpenDialogDir)o).ulFlags;
        }

        static StackObject* CopyToStack_ulFlags_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.OpenDialogDir)o).ulFlags;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = (int)result_of_this_method;
            return __ret + 1;
        }

        static void set_ulFlags_4(ref object o, object v)
        {
            ((huqiang.OpenDialogDir)o).ulFlags = (System.UInt32)v;
        }

        static StackObject* AssignFromStack_ulFlags_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.UInt32 @ulFlags = (uint)ptr_of_this_method->Value;
            ((huqiang.OpenDialogDir)o).ulFlags = @ulFlags;
            return ptr_of_this_method;
        }

        static object get_lpfn_5(ref object o)
        {
            return ((huqiang.OpenDialogDir)o).lpfn;
        }

        static StackObject* CopyToStack_lpfn_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.OpenDialogDir)o).lpfn;
            __ret->ObjectType = ObjectTypes.Integer;
            *(IntPtr*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_lpfn_5(ref object o, object v)
        {
            ((huqiang.OpenDialogDir)o).lpfn = (System.IntPtr)v;
        }

        static StackObject* AssignFromStack_lpfn_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.IntPtr @lpfn = *(IntPtr*)&ptr_of_this_method->Value;
            ((huqiang.OpenDialogDir)o).lpfn = @lpfn;
            return ptr_of_this_method;
        }

        static object get_lParam_6(ref object o)
        {
            return ((huqiang.OpenDialogDir)o).lParam;
        }

        static StackObject* CopyToStack_lParam_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.OpenDialogDir)o).lParam;
            __ret->ObjectType = ObjectTypes.Integer;
            *(IntPtr*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_lParam_6(ref object o, object v)
        {
            ((huqiang.OpenDialogDir)o).lParam = (System.IntPtr)v;
        }

        static StackObject* AssignFromStack_lParam_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.IntPtr @lParam = *(IntPtr*)&ptr_of_this_method->Value;
            ((huqiang.OpenDialogDir)o).lParam = @lParam;
            return ptr_of_this_method;
        }

        static object get_iImage_7(ref object o)
        {
            return ((huqiang.OpenDialogDir)o).iImage;
        }

        static StackObject* CopyToStack_iImage_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.OpenDialogDir)o).iImage;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_iImage_7(ref object o, object v)
        {
            ((huqiang.OpenDialogDir)o).iImage = (System.Int32)v;
        }

        static StackObject* AssignFromStack_iImage_7(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @iImage = ptr_of_this_method->Value;
            ((huqiang.OpenDialogDir)o).iImage = @iImage;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.OpenDialogDir();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
